{extend name="admin@index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">友情链接列表</div>
    <div class="layui-card-body">
        <div class="layui-tab">
            <ul class="layui-tab-title">
                <li><a href="{:url('admin/links.admin/index')}">友情链接列表</a></li>
                <li class="layui-this"><a href="{:url('admin/links.terms/index')}">分类列表</a></li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <table class="layui-hide" id="currentTable" lay-filter="currentTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script>
layui.use('yznTable', function() {
    var yznTable = layui.yznTable;

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTable',
        edit_url: '{:url("edit")}',
        delete_url: '{:url("del")}',
    };

    yznTable.render({
        init: init,
        toolbar: ['refresh'],
        url: '{:url("index")}',
        cols: [
            [
                { field: 'id', width: 70, title: 'ID' },
                { field: 'name',align: "left", title: '分类名称' },
                { width:90, title: '操作',templet: yznTable.formatter.tool,operat: ['edit','delete']}
            ]
        ],
        page: {}
    });

});
</script>
{/block}